package com.inspur.dgov.common.tool.utils;

/**
 * 分布式唯一ID生成器
 *
 * @author paascloud.net@gmail.com
 */
public class UniqueIdGenerator {

	private static SnowflakeIdWorker snowflakeIdWorker = null;

	public static synchronized long generateId(){
		if(snowflakeIdWorker == null){
			snowflakeIdWorker = new SnowflakeIdWorker(0,0);
		}
		return snowflakeIdWorker.nextId();
	}

}
